<?php

namespace AdminBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * AuthLinkUserGroups
 *
 * @ORM\Table(name="auth_link_user_groups", uniqueConstraints={@ORM\UniqueConstraint(name="idx_auth_link_user_groups_user_id_group_id", columns={"user_id", "group_id"})}, indexes={@ORM\Index(name="fk_auth_link_user_groups_group_id", columns={"group_id"}), @ORM\Index(name="IDX_124584A76ED395", columns={"user_id"})})
 * @ORM\Entity
 */
class AuthLinkUserGroups
{
    /**
     * @var \DateTime
     *
     * @ORM\Column(name="ctime", type="datetime", nullable=false)
     */
    private $ctime = 'CURRENT_TIMESTAMP';

    /**
     * @var string
     *
     * @ORM\Column(name="create_user", type="string", length=45, nullable=true)
     */
    private $createUser;

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var \AdminBundle\Entity\AuthUser
     *
     * @ORM\ManyToOne(targetEntity="AdminBundle\Entity\AuthUser")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     * })
     */
    private $user;

    /**
     * @var \AdminBundle\Entity\AuthGroup
     *
     * @ORM\ManyToOne(targetEntity="AdminBundle\Entity\AuthGroup")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="group_id", referencedColumnName="id")
     * })
     */
    private $group;



    /**
     * Set ctime
     *
     * @param \DateTime $ctime
     *
     * @return AuthLinkUserGroups
     */
    public function setCtime($ctime)
    {
        $this->ctime = $ctime;

        return $this;
    }

    /**
     * Get ctime
     *
     * @return \DateTime
     */
    public function getCtime()
    {
        return $this->ctime;
    }

    /**
     * Set createUser
     *
     * @param string $createUser
     *
     * @return AuthLinkUserGroups
     */
    public function setCreateUser($createUser)
    {
        $this->createUser = $createUser;

        return $this;
    }

    /**
     * Get createUser
     *
     * @return string
     */
    public function getCreateUser()
    {
        return $this->createUser;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set user
     *
     * @param \AdminBundle\Entity\AuthUser $user
     *
     * @return AuthLinkUserGroups
     */
    public function setUser(\AdminBundle\Entity\AuthUser $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \AdminBundle\Entity\AuthUser
     */
    public function getUser()
    {
        return $this->user;
    }

    /**
     * Set group
     *
     * @param \AdminBundle\Entity\AuthGroup $group
     *
     * @return AuthLinkUserGroups
     */
    public function setGroup(\AdminBundle\Entity\AuthGroup $group = null)
    {
        $this->group = $group;

        return $this;
    }

    /**
     * Get group
     *
     * @return \AdminBundle\Entity\AuthGroup
     */
    public function getGroup()
    {
        return $this->group;
    }
}
